package Banking_5;
//111111111111111111
public class Account {
    protected double balance;//余额  ,uml前该变量是 '-'
    public Account(double init_balance){
        balance=init_balance;
    }
    public double getBalance() {
        return balance;
    }
    public void setBalance(double b){this.balance=b;}
    //存钱

    public boolean deposit(double amt){
        this.balance+=amt;return true;
    }
    //取钱
    public Boolean withdraw(double amt) {
        if(amt>this.balance)
            return false;
        else{
            this.balance-=amt;
            return true;
        }
    }
}